-- GENERATED SPELL FOR [Azure Templar] --


function spell0_15211(pUnit, Event) --@Elemental Spawn-in,Self--
pUnit:FullCastSpellOnTarget(25035,pUnit)
pUnit:RegisterEvent('Sorts_15211', 598, 1)
end

function spell1_15211(pUnit, Event) --@Frost Nova,Self--
pUnit:FullCastSpellOnTarget(14907,pUnit)
pUnit:RegisterEvent('Sorts_15211', 8259, 1)
end

function spell2_15211(pUnit, Event) --@Frost Shock,n/a--
pUnit:FullCastSpellOnTarget(12548,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_15211', 8253, 1)
end

function Sorts_15211(pUnit, Event)
local choix_sorts_15211 = math.random(0, 2)
if choix_sorts_15211 == 0 then
pUnit:RegisterEvent('spell0_15211', 1, 1)
end
if choix_sorts_15211 == 1 then
pUnit:RegisterEvent('spell1_15211', 1, 1)
end
if choix_sorts_15211 == 2 then
pUnit:RegisterEvent('spell2_15211', 1, 1)
end
end

function mob15211_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_15211', math.random(1500, 3000), 1)
end

function mob15211_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob15211_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob15211_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(15211, 1, 'mob15211_Action')
RegisterUnitEvent(15211, 2, 'mob15211_Leave')
RegisterUnitEvent(15211, 3, 'mob15211_Kill')
RegisterUnitEvent(15211, 4, 'mob15211_Die')
